package com.hrt.bean;

import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;


@Entity
@Table(name = "HRT_STOCK")
public class Stocks implements Serializable {


	private static final long serialVersionUID = 2930759392471134457L;

	
	/**
	 * 库存记录ID
	 * 
	 * @pdOid 297bc53c-ec71-460f-aeeb-06ded7aed67b
	 */
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="STOCK_ID")
	private Long id;
	
	@Column(name="STOCK_CODE",nullable=false)
	private String stockCode;
	

	/**
	 * 出库，入库，退货入库，退货出库
	 */
	@Column(name="STOCK_ACTION", nullable=false)
	private Integer action;
	
	/**
	 * 是否来自订单
	 * 1 来自订单 
	 * 0直接生成库单
	 */
	@Column(name="IS_FROM_ORDER", nullable=false)
	private Integer isFromOrder=1;
	
	/**
	 * 订单编号
	 */
	@Column(name="ORDER_CODE", nullable=true)
	private String orderCode;
	
	
	/**
	 * 是否来自订单
	 * 1 来自订单 0直接生成库单
	 */
	@Column(name="ORDER_ID", nullable=true)
	private Long orderId;
	
	
	public Long getOrderId() {
		return orderId;
	}


	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}


	@Column(name="SUMMERY")
	private Double summery;
	
	
	@Column(name="CREATE_TIME")
	private Timestamp createTime;
	
	@Column(name="EDIT_TIME")
	private Timestamp editTime;
	
	
	@Column(name="CREATOR")
	private String creator;
	
	@Column(name="COMFIRMER")
	private String comfirmer;
	
	
	@Column(name="COMFIRM_TIME")
	private Timestamp comfirmTime;
	
	
	@Column(name="EDITOR")
	private String editor;
	
	
	@Column(name="NOTE")
	private String note;
	
	/**
	 * 产品库存记录  1 
	 * 礼品库存记录  2
	 * 
	 * @pdOid ab264729-d48e-4ed8-8795-398b97f09715
	 */
	@Column(name="RE_TYPE", nullable=false)
	private Integer reType;
	


	/**
	 *已录入，未确认0
	 *已确认 1
	 */
	@Column(name="STATUS", nullable=false)
	private Integer status=0;
	
	@Column(name="ISDELETE", nullable=false)
	private Integer isdelete=0;
	

	
	public Integer getIsdelete() {
		return isdelete;
	}


	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}


	public Double getSummery() {
		return summery;
	}


	public void setSummery(Double summery) {
		this.summery = summery;
	}


	public Timestamp getCreateTime() {
		return createTime;
	}


	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}


	public Timestamp getEditTime() {
		return editTime;
	}


	public void setEditTime(Timestamp editTime) {
		this.editTime = editTime;
	}


	public String getCreator() {
		return creator;
	}


	public void setCreator(String creator) {
		this.creator = creator;
	}


	public String getEditor() {
		return editor;
	}


	public void setEditor(String editor) {
		this.editor = editor;
	}


	public String getNote() {
		return note;
	}


	public void setNote(String note) {
		this.note = note;
	}

	public Long getId() {
		return id;
	}


	public void setId(Long id) {
		this.id = id;
	}


	public Integer getReType() {
		return reType;
	}


	public void setReType(Integer reType) {
		this.reType = reType;
	}

	
	
	public Integer getAction() {
		return action;
	}


	public void setAction(Integer action) {
		this.action = action;
	}
	
	public String getStockCode() {
		return stockCode;
	}


	public String getComfirmer() {
		return comfirmer;
	}


	public Timestamp getComfirmTime() {
		return comfirmTime;
	}


	public void setStockCode(String stockCode) {
		this.stockCode = stockCode;
	}


	public void setComfirmer(String comfirmer) {
		this.comfirmer = comfirmer;
	}


	public void setComfirmTime(Timestamp comfirmTime) {
		this.comfirmTime = comfirmTime;
	}

	public Integer getStatus() {
		return status;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}


	public Integer getIsFromOrder() {
		return isFromOrder;
	}


	public void setIsFromOrder(Integer isFromOrder) {
		this.isFromOrder = isFromOrder;
	}


	public String getOrderCode() {
		return orderCode;
	}


	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}


	
}
